package com.bwie.controller;
import com.bwie.pojo.Contract;
import com.bwie.service.ContractService;
import com.bwie.service.impl.ContractServiceImpl;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
* (t_contract)表控制层
*
* @author xxxxx
*/
@Api(tags = "合同管理")
@RestController
@RequestMapping("/store/contract")
public class ContractController {
/**
* 服务对象
*/
    @Autowired
    private ContractService contractService;

    @PostMapping("/getContractList")
    @ApiOperation("合同列表")
    public R getContractList(@RequestBody PageInfoVo pageInfoVo){
        return contractService.getContractList(pageInfoVo);
    }
    @ApiOperation("添加合同")
    @PostMapping("/addContract")
    public R addContract(@RequestBody @Validated Contract contract){
        return contractService.addContract(contract);
    }
//    @PostMapping("/uploadFile")
//    public R uploadFile(){
//
//    }
}
